package com.example.demo;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;

@Configuration
public class WebMvcConfig extends WebMvcConfigurationSupport{
	/**
	 * 自定义静态资源路径
	 */
		 @Override
		public void addResourceHandlers(ResourceHandlerRegistry registry) {
		        registry.addResourceHandler("/myres/**").addResourceLocations("classpath:/myres/");
		        super.addResourceHandlers(registry);
		}
}
